1. Field of the Invention
The present invention relates to a method of estimating the power consumption of a microprocessor on each instruction the microprocessor reads out of a main memory or an instruction cache and executes.
2. Description of the Prior Art
Computer technologies and semiconductor integrated circuits have made great progress recently, and accordingly, electronic equipment, in particular, personal computers have improved their compactness and portability. Under these circumstances, an important subject is to improve the processing speed of microprocessors as well as reducing the power consumption thereof. To achieve a reduction in power consumption, it is necessary to correctly evaluate the power consumption of a microprocessor when designing the same.
An example of a technique of evaluating the power consumption of a microprocessor is disclosed in "Power Analysis of Embedded Software; A First Step towards Software Power Minimization" of Vivek Tiwari, Sharad Malik, and Andrew Wolfe in IN IEEE-94, pp. 384-390 (1994). This is a method of evaluating the power consumption of a microprocessor including software.
This method pays attention to the kind of each instruction to be executed by a microprocessor and estimates the power consumption of the microprocessor. Namely, the method finds out the individual power consumption of different instructions to be executed by the microprocessor in advance, applies the found power consumption to each instruction that is still in an assembler program, and estimates total power to be consumed by the instructions when they are actually executed by the microprocessor.
This method executes a given instruction by the microprocessor and measures the power consumption thereof with a power meter connected to the microprocessor. If the microprocessor employs an instruction cache, it is necessary to separate cache-hit power consumption from cache-miss power consumption. These two kinds of power consumption are unable to be found out with the use of a single instruction file. Namely, it is necessary to prepare an instruction file 101 of FIG. 1 for measuring the cache-miss power consumption of each instruction, as well as an instruction file 102 of FIG. 2 for measuring the cache-hit power consumption of each instruction.
The instruction file 101 consists of a state setting section 103 for setting a microprocessor in a cache miss state, and a target instruction executing section 104 for executing target instructions for which power consumption is going to be estimated. The instruction file 102 consists of a state setting section 103 for setting a microprocessor in a cache hit state, and a target instruction executing section 104 for executing target instructions for which power consumption is going to be estimated. The state setting section 103 of FIG. 1 disables cached instructions and establishes a cache miss state, and the state setting section 103 of FIG. 2 executes, in advance, codes used by the instruction executing section 104 and establishes a cache hit state. As a result, the instruction files 101 and 102 are each long and intricate, and therefore, are difficult to prepare.
In this way, the prior art of finding out the power consumption of a microprocessor, which has an instruction cache, on each instruction involves long and intricate instruction files to set measuring environments for the microprocessor. Such instruction files are very difficult to make because they need time and labor to prepare.